15 Linear Model

Consider a linear model Y=β0+β1X1++βp1Xp1+ε,εN(0,σ2).

By MLE (see this example): β^=(XTX)1XTY.
Common hypothesis testing:H0:βj=0 vs. H1:βj0.

Theorem

Under H0, the test statistic S=1||e||2/[(np)σ2]β^jVar(β^j)tnp.
(Check definition of t distribution). Here e=YXβ^ is the residual.

Facts:

  1. Under H0, β^jVar(β^j)N(0,1).
  2. ||e||2σ2χnp2. (see here)
  3. ||e||2β^.

Today we will show that these facts imply Stnp.


Conditional density of continuous random variables:
X,Y are continuous RVs, with joint density fX,Y. Given measurable set AF, how to calculate P(XA|Y=y0)?
For δ1,P(XA|y0<Y<y0+δ)=P[(XA),(y0<Y<y0+δ)]P(y0<Y<y0+δ)=Ay0y0+δfX,Y(x,y)dydxy0y0+δfY(y)dyAfX,Y(x,y0)δdxfY(y0)δ=AfX,Y(x,y0)fY(y0)dx

Conditional Density

fX|Y=y0(x)=fX,Y(x,y0)fY(y0).

fX|Y=y0(x) is well defined if fY(y0)>0.

Independence

XYfX|Y=y(x)=fX(x),xR,yR,s.t.fY(y)>0.fX,Y(x,y)=fX(x)fY(y),x,yR.

Law of Total Probability

fX(x)=+fX,Ydy=+fX|Y=y(x)fY(y)dy.
Application 1

X,Yi.i.dN(0,1). Let R=XY. We want to calculatefR(r)=+fR|Y=y(r)fY(y)dy.
By independence of X,Y,(R|Y=y)=d(Xy|Y=y)=dXy.
Since T(X)=Xy is invertible and differentiable,fXy(r)=fX(ry)|d(ry)dr|=|y|fX(ry). ThereforefR(r)=+|y|12πe(ry)2212πey22dy=12π+yey22(1+r2)dy=1π(1+r2),thus RCauchy.

Application 2

X1,Y1,,Yki.i.dN(0,1). R=XY12++Yk2k. (Recall: G=Y12++Yk2Gamma(k2,12).) Note that(R|G=y)=d(Xg/k|G=g)=dXg/k.ThusfXg/k=gkfX(rgk).By law of total probabilityfR(r)=0+fR|G=y(r)fG(y)dy=0+gkfX(rgk)fG(y)dy=12πk12k/21Γ(k/2)0+g12(k+1)1eg2(r2k+1)dg=Γ((k+1)/2)Γ(k/2)1πk(1+r2k)k+12tk.
(Recall Γ(12)=π,Γ(α)=(α1)Γ(α1).)

What happens as k?
Y12,,Yk2i.i.dGamma(12,12), E(Yi2)=1.
By SLLN, Y12++Yk2ka.s.1, so tkN(0,1).